<?php echo $header; ?>
<style>
		.slide
			{
				padding:20px 30px; 
				margin:4px 0 px 0; 
				border:1px solid #e1e1e1;
			}
		#cont{width:550px;margin:0 auto;background:#fff;text-align:left;padding:20px}
</style>
<script type="text/javascript">
	window.addEvent('domready',function(){
		
		//SAMPLE 7
		var startItem = 6; //or   0   or any
		var thumbs_mask7 = $('thumbs_mask7').setStyle('left',(startItem*60-568)+'px').setOpacity(0.8);
		var fxOptions7 = {duration:1000, transition:Fx.Transitions.Back.easeOut, wait:false}
		var thumbsFx = new Fx.Style(thumbs_mask7,'left',fxOptions7);
		var hs7 = new noobSlide({
			box: $('box7'),
			items: [0,1,2,3,4,5,6,7],
			handles: $ES('span','thumbs_handles7'),
			fxOptions: fxOptions7,
			onWalk: function(currentItem){
				thumbsFx.start(currentItem*60-568);
			},
			startItem: startItem
		});
		hs7.walk(0);
	});
</script>
<!-- MAIN CONTAINER -->
	<!-- MAIN CONTAINER -->
	<div id="ja-container" class="wrap ja-r1">
		<div class="main">	
			<div class="ja-rs2-top">
				<div class="ja-rs2-tl">&nbsp;</div>
				<div class="ja-rs2-tr">&nbsp;</div>
			</div>
			
			<div class="ja-rs2-mid">
				<div class="ja-rs2-ml">
					<div class="ja-rs2-mr clearfix">
						<div id="ja-mainbody" style="width:70%">
						<div id="ja-main" style="width:100%">
								<div class="inner clearfix">	
									<div id="ja-contentwrap" class="ja-r1">
			<!-- CONTENT -->
			<div class="ja-mass ja-mass-top clearfix">
	
			<div class="ja-rs3-top"><div class="ja-rs3-tl">&nbsp;</div><div class="ja-rs3-tr">&nbsp;</div></div>
		
				<div class="ja-rs3-mid"><div class="ja-rs3-ml"><div class="ja-rs3-mr">
					<div class="ja-moduletable moduletable title-orange  clearfix">
						<h3><span><strong class="first-word"><strong><?php echo $heading_title; ?></strong></strong></span></h3>
							<div class="ja-box-ct clearfix" style="padding-left:20px;padding-right:20px;">
							<!-- loop through images -->	

							<div id="cont">
								<div class="slide">
									<div class="mask6">
										<div id="box7">
											<?php if ($images) { ?>
											<?php foreach ($images as $image) { ?>
												<span><img width="450" height="250" alt="<?php echo $heading_title; ?>" src="<?php echo $image['other']; ?>" /></span>
											<?php } ?>
											<?php } ?>
										</div>
									</div>
								
									<div id="slidethumbs">
										<div class="thumbschild">
											<?php if ($images) { ?>
											<?php foreach ($images as $image) { ?>
												<div><img alt="<?php echo $heading_title; ?>" src="<?php echo $image['other']; ?>" /></div>
											<?php } ?>
											<?php } ?>
										</div>
								
										<div id="thumbs_mask7"></div>
								
										<p id="thumbs_handles7">
											<?php if ($images) { ?>
											<?php foreach ($images as $image) { ?>
												<span></span>
											<?php } ?>
											<?php } ?>
										</p>
									</div>
								</div>
								</div>
								
								<div class="clear"></div>
								<div class="inner clearfix" >

								<?php foreach ($downloads as $download) {?>
									<?php if(isset($download)){?>
											<?php echo $text_name; ?> <?php echo $download['name']; ?>
											<div style="margin:10px 0px;"><a style="cursor: pointer;padding:8px 20px;" id="change" onclick="location = '<?php echo str_replace('&', '&amp;', $download['href']); ?>'" class="button"><span><?php echo $text_download; ?></span></a></div>	
								<?php }}?>
								<p style="margin-top:10px;"><?php echo $description; ?></p>
								</div>

								<div id="social">
								 
								<a class="twitter" onclick="share_twitter();" title="Tweet this!">Tweet this page</a>
								
								<a class="stumbleupon" onclick="share_stumbleupon();" title="Share on StumbleUpon">Share on StumbleUpon</a>
								<a class="reddit" onclick="share_reddit();" title="Share on Reddit">Share on Reddit</a>
								<a class="digg" onclick="share_digg();" title="Share on Digg">Share on Digg</a>
								
								<a class="delicious" onclick="share_delicious();"  title="Share on Delicious">Share on Delicious</a>
								
								<a class="facebook" onclick="share_facebook();" title="Share in Facebook">Share in Facebook</a>
								
								</div>
								<div class="clearleft" ></div>
								<div class="page-break"></div>
								<h4><?php echo $tab_related; ?></h4>
								<div style="border:1px solid #cecece;padding:5px;margin-top:10px;">
							      <?php if ($products) { ?>
							      <table class="list">
							        <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
							        <tr>
							          <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
							          <td width="25%"><?php if (isset($products[$j])) { ?>
							            <a href="<?php echo str_replace('&', '&amp;', $products[$j]['href']); ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a><br />
							            <a href="<?php echo str_replace('&', '&amp;', $products[$j]['href']); ?>"><?php echo $products[$j]['name']; ?></a><br />       
							            <?php } ?></td>
							          <?php } ?>
							        </tr>
							        <?php } ?>
							      </table>
							      <?php } else { ?>
							      <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;"><?php echo $text_no_related; ?></div>
							      <?php } ?>
						    	</div>

	<script type="text/javascript">
			
		function share_facebook()
		{
			var	u=location.href;
			var t=document.title;
			window.open("http://www.facebook.com/share.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t));
		
		}
		
		function share_twitter()
		{
			var	uvnn=location.href;
			var tvnn=document.title;
			window.open("http://twitter.com/home?status=" + encodeURIComponent(uvnn));
		}
		
		function share_stumbleupon()
		{
			var	uvnn=location.href;
			var tvnn=document.title;
			window.open("http://www.stumbleupon.com/submit?url=" + encodeURIComponent(uvnn));
		}
		
		function share_reddit()
		{
			var	uvnn=location.href;
			var tvnn=document.title;
			window.open("http://www.reddit.com/submit?url=" + encodeURIComponent(uvnn));
		}
		
		function share_digg()
		{
			var	uvnn=location.href;
			var tvnn=document.title;
			window.open("http://digg.com/submit?phase=2&amp;amp;url=" + encodeURIComponent(uvnn));
		}
		function share_delicious()
		{
			var	uvnn=location.href;
			var tvnn=document.title;
			window.open("http://del.icio.us/post?url=" + encodeURIComponent(uvnn));
		}
	</script>
	<script type="text/javascript"><!--
		$('#review .pagination a').live('click', function() {
			$('#review').slideUp('slow');
				
			$('#review').load(this.href);
			
			$('#review').slideDown('slow');
			
			return false;
		});			
		
		$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');
		
		function review() {
			$.ajax({
				type: 'POST',
				url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
				dataType: 'json',
				data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
				beforeSend: function() {
					$('.success, .warning').remove();
					$('#review_button').attr('disabled', 'disabled');
					$('#review_title').after('<div class="wait"><img src="catalog/view/theme/default/image/loading_1.gif" alt="" /> <?php echo $text_wait; ?></div>');
				},
				complete: function() {
					$('#review_button').attr('disabled', '');
					$('.wait').remove();
				},
				success: function(data) {
					if (data.error) {
						$('#review_title').after('<div class="warning">' + data.error + '</div>');
					}
					
					if (data.success) {
						$('#review_title').after('<div class="success">' + data.success + '</div>');
										
						$('input[name=\'name\']').val('');
						$('textarea[name=\'text\']').val('');
						$('input[name=\'rating\']:checked').attr('checked', '');
						$('input[name=\'captcha\']').val('');
					}
				}
			});
		}

		$.tabs('.tabs a'); 
	//--></script>
		</div></div></div></div></div>
		
					<div class="ja-rs3-bot"><div class="ja-rs3-bl">&nbsp;</div><div class="ja-rs3-br">&nbsp;</div></div>
					</div>
					</div>
				</div>
			</div>
	<!-- //CONTENT -->
			</div>
		<!-- RIGHT COLUMN-->
		<?php echo $column_right; ?>
		<!-- END RIGHT COLUMN--> 
	</div></div></div>
	</div>
	</div>
	
<?php echo $footer; ?> 